package com.model.speelveld;

import java.util.Observable;

public class GameModel extends Observable{

	private int level = 1;
	private int waveNumber = 0;
	private int enemiesKilled = 0;
	private int money = 200;
	private int score = 0;
	private int lives = 5;

	public int getWaveNumber() {
		return waveNumber;
	}

	public void nextWave() {
		this.waveNumber++;
		setChanged();
		notifyObservers();
	}
	
	public void resetWave()
	{
		this.waveNumber = 0;
		setChanged();
		notifyObservers();
	}

	public int getEnemiesKilled() {
		return enemiesKilled;
	}

	public void enemyKilled() {
		this.enemiesKilled++;
		setChanged();
		notifyObservers();
	}

	public int getScore() {
		return score;
	}

	public void addScore(int score) {
		this.score += score;
		setChanged();
		notifyObservers();
	}

	public int getLives() {
		return lives;
	}

	public void removeLive() {
		this.lives--;
		setChanged();
		notifyObservers();
	}

	public int getMoney() {
		return money;
	}

	public void addMoney(int money) {
		this.money += money;
		setChanged();
		notifyObservers();
	}
	
	public void removeMoney(int money)
	{
		this.money -= money;
		setChanged();
		notifyObservers();
	}

	public int getLevel() {
		return level;
	}

	public void addLevel() {
		this.level++;
		setChanged();
		notifyObservers();
	}
	
	public boolean buyCheck(int money)
	{
		if((this.money - money) >= 0)
		{
			return true;
		}
		return false;
	}
}
